{% extends 'base.html' %}
{% load helpers %}

{% block title %}Remove {{ table.rows|length }} {{ obj_type_plural|bettertitle }}?{% endblock %}

{% block content %}
    <form action="." method="post" class="h-100 vstack">
        {% csrf_token %}
        {% for field in form.hidden_fields %}
            {{ field }}
        {% endfor %}
        <div class="row align-content-start justify-content-center flex-fill">
            <div class="col-lg-8 col-md-10 d-flex justify-content-center">
                <div class="card border-danger">
                    <div class="card-header bg-danger-subtle border-danger text-body">
                        <strong>Confirm Bulk Removal</strong>
                    </div>
                    <div class="card-body">
                        <strong>Warning:</strong> The following operation will remove {{ table.rows|length }} {{ obj_type_plural }} from {{ parent_obj }}. Please carefully review the {{ obj_type_plural }} to be removed and confirm below.
                    </div>
                </div>
            </div>
            <div class="col-md-8 offset-md-2">
                <div class="card">
                    <div class="table-responsive">
                        {% include 'inc/table.html' %}
                    </div>
                </div>
            </div>
        </div>
        <div class="nb-form-sticky-footer">
            <button type="submit" name="_confirm" class="btn btn-danger">
                <span aria-hidden="true" class="mdi mdi-trash-can-outline me-4"></span><!--
                -->Delete these {{ table.rows|length }} {{ obj_type_plural }}
            </button>
            <a href="{{ return_url }}" class="btn btn-secondary">
                <span aria-hidden="true" class="mdi mdi-close me-4"></span><!--
                -->Cancel
            </a>
        </div>
    </form>
{% endblock %}
